<?php
require_once 'config.php';
require_once 'function.php';
require_once 'class/Mysql.class.php';

$db = new Mysql();

$table = array(
	23=>20072,
	26=>20045,
	33=>20183,
	34=>20209,
	43=>20310,
	44=>21625,
	45=>20351,
	135=>21621,
	136=>21654,
	139=>21682,
	142=>21706,
	191=>22010,
	192=>22018,
	194=>22054,
	39=>20327,
	74=>20735
);


$arr_de = array(
	'DVD Converter für Mac',
	'DVD Creator für Mac',
	'Video Converter Platinum 2013',
	'Video Converter für Mac',
	'Video Converter Pro für Mac',
	'Video Converter Ultimate',
	'Video Converter Pro',
	'Video Editor',
	'Video Converter Ultimate für Mac',
	'Vivideo für Mac',
	'Fantashow für Mac',
	'DVD Slideshow Builder HD-Foto',
	'DVD Slideshow Builder HD-Video Deluxe',
	'Flash Gallery Factory Deluxe',
	'Photo Collage Studio 2012',
	'iCollage für Mac',
	'iMate',
	'PDF Converter',
	'PDF Converter für Mac',
	'PDF Converter Pro',
	'PDF Converter Pro für Mac',
	'PDF 2 PowerPoint Converter',
	'PowerPoint 2 Flash Professionell 5',
	'PDF to Word Converter',
	'Photo Recovery',
	'PDF Editor für Mac',
	'PDF Editor Pro für Mac',
	'Data Recovery'
);


$arr_en = array(
	'DVD Ripper for Mac',
	'DVD Creator for Mac',
	'Video Converter Platinum',
	'Video Converter for mac',
	'Video Converter Pro for mac',
	'Video Converter Ultimate',
	'Video Converter Pro',
	'Video Editor',
	'Video Converter Ultimate for Mac',
	'Vivideo for mac',
	'Fantashow for Mac',
	'DVD Slideshow Builder Standard',
	'DVD Slideshow Builder Deluxe',
	'Flash Gallery Factory Deluxe',
	'Photo Collage Studio',
	'iCollage for Mac',
	'iMate',
	'PDF Converter',
	'PDF Converter for Mac',
	'PDF Converter Pro',
	'PDF Converter Pro for Mac',
	'PDF to PowerPoint Converter',
	'PPT2Flash Professional',
	'PDF to Word Converter',
	'Photo Recovery',
	'PDF Editor for Mac',
	'PDF Editor Pro for Mac',
	'Data Recovery'
);

foreach( $arr_de as $k=>$v ){
	foreach($table as $kk=>$vv){
		$sql = "update Table_{$kk} set Field_{$vv} = '{$v}' where trim(Field_{$vv}) = '{$arr_en[$k]}'";
		$db->query( $sql );
		//exit;
	}
}

echo 444;